import Vue from 'vue'
import Router from 'vue-router'
import Add from '@/components/Add'
import floor from '@/components/floor.vue'
import ltem from '@/components/Ltem.vue'
import Error from '@/components/404.vue'

Vue.use(Router)

export default new Router({

  routes: [

    {
      path: '/',
      redirect: '/add'
    },
    {
      path: '/add',
      name: 'HelloWorld',
      component: Add
    },
    {
      path: '/floor',
      name: 'floor',
      component: floor,
      meta: { a: true },
      children: [{
        path: 'ltem',
        name: 'ltem',
        component: ltem

      }]
    },
    {
      path: '*',
      name: '404',
      component: Error
    }
  ]

})
